
<template>	
    <view class="content">
		<video autoplay="true" 
		:src="jksrc"
		 @error="error"
		  @fullscreenchange="fullscreenchange"></video>
		
    </view>
</template>
<script>
    export default {
        data() {
            return {
                title: '视频监控查看',
				jksrc:''
            }
        },
        onLoad(options) {
			let id = options.id;
			this.$http.get("/project/v1/monitorInfo.do?sId="+id,{
				params: ''
			}).then(data=>{
				this.jksrc=data.data.rtmpLiveIntranetUrl;
				this.title =data.data.sChannelName;
			})
        },
       methods: {
       			error: function() {
       
       			},
       			fullscreenchange: function(event) {
       				//智能切换屏幕方向//会导致第二次进入页面显示异常，宽高获取异常导致rpx出错
       				if (event.detail.fullScreen) { //全屏
       					plus.screen.lockOrientation("landscape") //自动感应切换屏幕横屏的方向
       				} else { //全屏切换为小屏
       					plus.screen.lockOrientation("portrait-primary") //设置屏幕竖直
       				}
       			}
       		}
       	}
       </script>
       
       <style>
       	video {
       		width: 750rpx;
       		position: fixed;
       		top: 0;
       		left: 0;
       	}
       
       	.list {
       		margin-top: 470rpx;
       	}
       
       	.listview {
       		margin-top: 30rpx;
       	}
       </style>